package com.sdhs.system.service.impl;

import com.sdhs.system.domain.GcContractParty;
import com.sdhs.system.mapper.GcContractPartyMapper;
import com.sdhs.system.service.IGcContractPartyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 合同子表-相对方Service业务层处理
 *
 * @author add
 * @date 2025-04-04
 */
@Service
public class GcContractPartyServiceImpl implements IGcContractPartyService
{
    @Autowired
    private GcContractPartyMapper gcContractPartyMapper;

    /**
     * 查询合同子表-相对方
     *
     * @param id 合同子表-相对方主键
     * @return 合同子表-相对方
     */
    @Override
    public GcContractParty selectGcContractPartyById(Long id)
    {
        return gcContractPartyMapper.selectGcContractPartyById(id);
    }

    @Override
    public GcContractParty selectGcContractPartyByCode(String participantsCode)
    {
        return gcContractPartyMapper.selectGcContractPartyByCode(participantsCode);
    }

    /**
     * 查询合同子表-相对方列表
     *
     * @param gcContractParty 合同子表-相对方
     * @return 合同子表-相对方
     */
    @Override
    public List<GcContractParty> selectGcContractPartyList(GcContractParty gcContractParty)
    {
        return gcContractPartyMapper.selectGcContractPartyList(gcContractParty);
    }

    /**
     * 新增合同子表-相对方
     *
     * @param gcContractParty 合同子表-相对方
     * @return 结果
     */
    @Override
    public int insertGcContractParty(GcContractParty gcContractParty)
    {
        return gcContractPartyMapper.insertGcContractParty(gcContractParty);
    }

    /**
     * 修改合同子表-相对方
     *
     * @param gcContractParty 合同子表-相对方
     * @return 结果
     */
    @Override
    public int updateGcContractParty(GcContractParty gcContractParty)
    {
        return gcContractPartyMapper.updateGcContractParty(gcContractParty);
    }

    /**
     * 批量删除合同子表-相对方
     *
     * @param ids 需要删除的合同子表-相对方主键
     * @return 结果
     */
    @Override
    public int deleteGcContractPartyByIds(Long[] ids)
    {
        return gcContractPartyMapper.deleteGcContractPartyByIds(ids);
    }

    /**
     * 删除合同子表-相对方信息
     *
     * @param id 合同子表-相对方主键
     * @return 结果
     */
    @Override
    public int deleteGcContractPartyById(Long id)
    {
        return gcContractPartyMapper.deleteGcContractPartyById(id);
    }
}
